import request from '@/utils/request'

// 查询车辆信息管理列表
export function listCar(query) {
  return request({
    url: '/basicInformation/car/list',
    method: 'get',
    params: query
  })
}
// 查询车辆信息管理列表
export function listCarCurrentPoint(query) {
  return request({
    url: '/basicInformation/car/listCarCurrentPoint',
    method: 'get',
    params: query
  })
}
// 查询车辆信息管理列表
export function listCarTrace(query) {
  return request({
    url: '/basicInformation/car/listCarTrace',
    method: 'get',
    params: query
  })
}
// 查询车辆信息管理详细
export function getCar(id) {
  return request({
    url: '/basicInformation/car/' + id,
    method: 'get'
  })
}

// 查询是否有车辆即将到期
export function checkCarLimit() {
  return request({
    url: '/basicInformation/car/checkCarLimit',
    method: 'get'
  })
}

// 新增车辆信息管理
export function addCar(data) {
  return request({
    url: '/basicInformation/car',
    method: 'post',
    data: data
  })
}

// 修改车辆信息管理
export function updateCar(data) {
  return request({
    url: '/basicInformation/car',
    method: 'put',
    data: data
  })
}

// 删除车辆信息管理
export function delCar(id) {
  return request({
    url: '/basicInformation/car/' + id,
    method: 'delete'
  })
}

// 导出车辆信息管理
export function exportCar(query) {
  return request({
    url: '/basicInformation/car/export',
    method: 'get',
    params: query
  })
}

export function unBundling(query) {
  return request({
    url: '/basicInformation/car/unBundling',
    method: 'post',
    data: query
  })
}
